
#ifndef				__PLUGINMANAGER_H__
# define			__PLUGINMANAGER_H__

# include			<QLibrary>
# include			<QString>
# include			<QDir>
# include			<map>
# include			<vector>
# include			"IPluginManager.h"

class					PluginManager : public IPluginManager
{
public:
	PluginManager(std::string, BabelApi *);
	~PluginManager();
	virtual IModule		*getPlugin(const std::string &);
	virtual	void		setApi(BabelApi *);
	virtual void		load();
	virtual IModule		*getPluginProtocol(Protocol);

private:
	std::map<std::string, IModule *>	_plugins;
	std::vector<QLibrary *>				_libs;
	const std::string					_dir;
	BabelApi							*_api;
};

#endif // !
